Unexpected Doors Close

I have a problem. The Doors is showing a anormal behavior for me.
I write a script for create an attribute and the conditions for the attribute receive certains value like below:
 

if (null obj."Object Heading" "") {
 
    if((exists attribute "Affected Requirements")&&(exists attribute "Affected Models")&&(exists attribute "Pre-Checks")&&(exists attribute "PChecks")){
        
//AF != "" && AM == ""
        if((obj."Affected Requirements" "" != "" || obj."Affected Requirements" ""!= "none" || obj."Affected Requirements" "" != "None")&&(obj."Affected Models" ""== "" || obj."Affected Models" ""== "none" || obj."Affected Models" "" == "None")&&(isMember(obj."Pre-Checks", "Requirements OK")) && (isMember(obj."Pre-Checks", "TagBlock Links OK"))){
            obj."PChecks" "" == "Ok"              
                                        }
else{                 
       if((obj."Affected Requirements" "" != "" || obj."Affected Requirements" "" != "none" || obj."Affected Requirements" "" != "None")&&(obj."Affected Models" "" != "" || obj."Affected Models" ""!= "none" || obj."Affected Models" "" != "None")&&(isMember(obj."Pre-Checks", "Requirements OK")) && (isMember(obj."Pre-Checks", "TagBlock Links OK")) && (isMember(obj."Pre-Checks", "EmbLib-OK Passed")) && (isMember(obj."Pre-Checks", "Tests Passed"))){
            obj."PChecks" "" == "Ok"              
                                        }
        else{
                if((obj."Affected Requirements" "" == "" || obj."Affected Requirements" "" == "none" || obj."Affected Requirements" "" == "None")&&(obj."Affected Models" "" != "" || obj."Affected Models" ""!= "none" || obj."Affected Models" "" != "None") && (isMember(obj."Pre-Checks", "EmbLib-OK Passed")) && (isMember(obj."Pre-Checks", "Tests Passed"))){
                        obj."PChecks" "" == "Ok"          
                                        }
                        else obj."PChecks" "" == "NOk"                    
                }
            }
    }
}

 


When i add the attribute in the view, the Doors close the module e then close itself. Looks like a error message appear but its too fast for me to see.
It happened with somebody?

 


Bruw - Mon Jan 16 08:09:16 EST 2012

Re: Unexpected Doors Close
Tony_Goodman - Mon Jan 16 09:20:06 EST 2012

You need a single equals sign rather than double for an assignment statement.

else obj."PChecks" "" = "NOk"

Tony Goodman, www.smartdxl.com

Re: Unexpected Doors Close
llandale - Mon Jan 16 13:28:23 EST 2012

Tony_Goodman - Mon Jan 16 09:20:06 EST 2012
You need a single equals sign rather than double for an assignment statement.

else obj."PChecks" "" = "NOk"

Tony Goodman, www.smartdxl.com

... and get rid of the two double-quotes
-else obj."PChecks" = "NOk"

I advise routinely using the "probeAttr_" built in function, a universally known "secret", which checks for attribute existence before retrieving the value.

This generates a dxl error when "A" doesn't exist:
-string s = obj."A"
This returns null when "A" doesn't exist:
-string s = probeAttr_(obj, "A")

probeAttr_ relieves you of trapping DXL errors or seeking attribute existance when retrieving values, so long as the logic can handle a null returned value to also mean the attr doesn't exist.

probeAttr_() and all its various overloaded and sibling functions are here:
-c:\Program Files\IBM\Rational\DOORS\9.3\lib\dxl\utils\attrutil.inc

-Louie